<template>
  <el-table id="planTable" :data="myTableData" style="width: 100%">
    <el-table-column label="订单信息" align="center">
  
      <el-table-column prop="pp" label="品牌" width="60">
      </el-table-column>
      <el-table-column prop="dd" label="订单">
      </el-table-column>
  
      <el-table-column prop="scph" label="生产批号" width="140" align="left">
      </el-table-column>
      <el-table-column prop="pm" label="品名" width="140">
      </el-table-column>
      <el-table-column prop="sl" label="数量">
      </el-table-column>
      <!-- <el-table-column prop="lt" label="链头">
                  </el-table-column>
                  <el-table-column prop="lp" label="拉片">
                  </el-table-column>
                  <el-table-column prop="ly" label="链牙">
                  </el-table-column>
                  <el-table-column prop="fk" label="方块">
                  </el-table-column>
                  <el-table-column prop="xc" label="下插">
                  </el-table-column>
                  <el-table-column prop="sz" label="上止">
                  </el-table-column> -->
  
    </el-table-column>
  
    <el-table-column label="物料与产线" align="center">
      <el-table-column prop="location" width="140" label="位置">
      </el-table-column>
      <el-table-column prop="cxh" label="产线号">
      </el-table-column>
      <el-table-column prop="bz" label="班组">
      </el-table-column>
      <!--<el-table-column prop="zt" label="状态">
      </el-table-column> -->
  
      <el-table-column prop="zt" label="标签">
        <template slot-scope="scope">
              <el-tag
                :type="stateClass(scope.row.zt)"
                close-transition>{{stateText(scope.row.zt)}}</el-tag>
</template>
    </el-table-column>


          </el-table-column>



          <el-table-column label="质检信息" align="center">
            <el-table-column prop="jcj" label="检测机">
            </el-table-column>
            <el-table-column prop="lpl" label="良品率">
            </el-table-column>
            <el-table-column prop="qxs" label="缺陷数">
            </el-table-column>
            <el-table-column prop="ycqx" label="异常缺陷">
            </el-table-column>
          </el-table-column>
        </el-table>
</template>

<script>
  export default {
    props: ['myTableData'],
  
    methods: {
      formatter(row, column) {
        return row.address;
      },
      filterTag(value, row) {
        return row.tag === value;
      },
  
      stateClass(zt) {
  
        switch (zt) {
          case "0":
            return "info";
          case "1":
            return "success";
          case "2":
            return "warning";
          case "3":
            return "danger";
          case "100":
            return "primary";
  
        }
      },
  
      stateText(zt) {
  
        switch (zt) {
          case "0":
            return "未开始";
          case "1":
            return "生产中";
          case "2":
            return "警报";
          case "3":
            return "异常";
          case "100":
            return "已完成";
  
        }
  
  
      }
    },
  
  
    data() {
      return {
  
      }
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  /*  .el-table tr{
          background:#2c343c;
          color:#ffffff;
        }
        .el-table thead.is-group th{
          background:#2c343c;
        } */
</style>
